<h1>Archetype to ease developments</h1>

<pre class="sh_javascript right">
/**
 * Constructor
 */
initialize: function () {
	$("bodyContent")
	  .observe("click", this.createDate);
},
/**
 * Private method which launch the DateUpdate event
 * with the current date in parameter
 */
_createDate : function () {
	this.fireDateUpdate(new Date());
},
/**
 * Fire a "DateUpdate" event
 */
fireDateUpdate: _,
/**
 * Listen to "DateUpdate" event
 */
onDateUpdate: function(eventName, date) {
	Logger.log(
	  "controller received a date:" + date);
}
</pre>

<p>A unique mechanism in JavaScript: MethodBuilders</p>
<ul>
	<li>We don't implement a component, we just describe it</li>
	<li>Archetype build the object and enhance it with the services by methodbuilders</li>
</ul>

<p>MethodBuilders additions:</p>
<ul>
	<li>Launch and receive an event</li>
	<li>Private methods</li>
	<li>this binding on every methods</li>
</ul>

<p>Logs!</p>
<ul>
	<li>Archetype defines a generic interface for logging</li>
	<li>You can choose display solution: Firebug, JS alert, directly in the page body, nothing...</li>
	<ul>
		<li></li>
	</ul>
</ul>

